Add FEN import/export, undo/redo, AI opponent, and chess engine extraction guide#29
Merged
mgierschdev merged 7 commits intomainfrom Dec 22, 2025
Merged
Conversation
Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
Owner
|
@copilot implement, don’t forget unit tests per functionality |
Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Extract chess engine to reusable library
Add FEN import/export, undo/redo, AI opponent, and chess engine extraction guide
Dec 22, 2025
…essAI) Co-authored-by: mgierschdev <62764972+mgierschdev@users.noreply.github.com>
Contributor
Author
Added comprehensive unit tests for all functionality: FEN Import/Export: All 44+ tests passing. Fixed critical bug in AI where Position mutation caused ArrayIndexOutOfBoundsException. Commit: 920c825 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements four core enhancements: FEN notation support, move undo/redo with state snapshots, minimax AI opponent with alpha-beta pruning, and comprehensive documentation for extracting the chess engine as a reusable library.
FEN Import/Export
FENParserutility class supporting all 6 FEN components (piece placement, active color, castling rights, en passant, halfmove clock, fullmove number)importFromFEN(String)andexportToFEN()methods onChessGamePOST /importFEN,GET /exportFENFENParserTest(10 tests)Undo/Redo
GameStateSnapshotimmutable snapshots capturing complete game state (board, turn, castling rights, en passant, captured pieces, halfmove clock)ChessGamefor unlimited undo depthGET /undo,GET /redo,GET /undoRedoStatusUndoRedoTest(11 tests)AI Opponent
BoardEvaluatorwith material evaluation (standard piece values) and positional bonuses (pawn advancement, knight centralization)ChessAIminimax implementation with alpha-beta pruning (default depth: 3 ply)GET /aiMovereturnsfromRow,fromCol,toRow,toCol,scoreBoardEvaluatorTest(10 tests) +ChessAITest(13 tests)Chess Engine Extraction
CHESS_ENGINE_EXTRACTION_GUIDE.md: Three extraction options (multi-module Gradle, Maven artifact, JAR)CHESS_ENGINE_API.md: Complete API reference with examplesChessboard,ChessGame), models, utilities (FENParser,PGNExporter), AIImplementation Notes
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.